/*
 * @Author: 李天惊 uf_lee@163.com
 * @Date: 2022-08-15 16:45:25
 * @LastEditors: 李天惊 uf_lee@163.com
 * @LastEditTime: 2022-09-01 09:51:23
 * @FilePath: \ahbs\uc_sys\src\api\uc\data\index.ts
 * Copyright (c) 2022 by 李天惊 uf_lee@163.com, All Rights Reserved.
 */
import { useAxios } from '@/hooks/web/useAxios'
const request = useAxios()

import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()

// 功能权限列表
export const ucDaListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucDaList',
      data: data
    }
  })
}

// 功能权限修改
export const ucDaEditApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucDaEdit',
      data: data
    }
  })
}

// 功能权限新增
export const ucDaAddApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucDaAdd',
      data: data
    }
  })
}

// 功能权限删除
export const ucDaDelApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucDaDel',
      data: data
    }
  })
}
